﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<TITLE> <? echo $title;?> </TITLE>
<base href="<?php echo base_url() ?>" />
<LINK href="images/default.css" type="text/css" rel=stylesheet>
<SCRIPT src="js/common.js" type="text/javascript"></SCRIPT>
<SCRIPT src="js/jquery.min.js" type="text/javascript"></SCRIPT>
<script src="js/jquery.form.js" type="text/javascript"></script>
<SCRIPT type="text/javascript">
   function collapse_change(menucount) {
       $("#list_"+menucount).toggle() ;
}
</SCRIPT>
<SCRIPT type="text/javascript">
<!--
$(function(){
	$('#msgs').hide();
    var options = {
		target:     '#msgs', //结果显示目标
    	url:        '<?php echo site_url("admin/saveLev") ?>', //action目标
		beforeSubmit: function(){

		    			if($('#name').val()==''){
							$('#msgs').html("<span class=\"about_content_title\">[权根名称]不能为空!</span>");
							$('#msgs').show(1000);
							$('#msgs').hide(3000);
                            $('#name').focus();
							return false;
						}

						if($('#dspt').val()==''){
							$('#msgs').html("<span class=\"about_content_title\">[权根描述]不能为空!</span>");
							$('#msgs').show(1000);
							$('#msgs').hide(3000);
                            $('dspt').focus();
							return false;
						}
	                   if($('#lev').val()==''){
							$('#msgs').html("<span class=\"about_content_title\">[级别字串]不能为空!</span>");
							$('#msgs').show(1000);
							$('#msgs').hide(3000);
                            $('#lev').focus();
							return false;
						}
                        $("#submit").attr('value','正在提交...');
                        $(":input") .attr('disabled', true) ;
						$('#msgs').html("<img src=\"images/loading.gif\" /><span class=\"about_content_title\"> 资料正在提交，请稍候。。。</span>");
    					$('#msgs').show(1000);
					},
    	success:    function() {
                      $(":input") .attr('disabled', false);
                       $("#submit").attr('value','保 存');
                       $('#msgs').show(5000);
                       window.location.reload();


    				}
    };
    $('#myform').ajaxForm(options);
});
-->
</SCRIPT>
</HEAD>
<BODY topMargin=10>
<TABLE cellSpacing=6 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE class=guide cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><A href="<?php echo site_url("admin/info"); ?>" target="main">后台首页</A>&nbsp;»系统权根管理</TD>
        </TR></TBODY></TABLE>
      <BR>
            <TABLE class="tableborder" cellSpacing=0 cellPadding=0 width="100%"
border=0>
        <TBODY>
        <TR class="header">
          <TD colSpan=5>系统权根列表<A onClick="collapse_change(1)" href="javascript:void(0)"><IMG src="images/menu_reduce.gif" name="menuimg_b8e6f4fa493903c4" border=0 id=menuimg_b8e6f4fa493903c4 style="MARGIN-TOP: -12px; FLOAT: right; MARGIN-RIGHT: 8px"></A> </TD>
        </TR>
        <TBODY id=list_1>
        <TR>
          <TD width="50" class=altbg1><b>ID</b></TD>
          <TD width="100" class="altbg1"><b>权根名称</b></TD>
          <TD class="altbg1"><b>权根字串</b></TD>
          <TD width="80" class=altbg1><b>编辑</b></TD>
          <TD width="80" class=altbg1><b>删除</b></TD>
        </TR>
        <?php
        if(isset($lev))
        {
        	foreach ($lev->result() as $row) :
        ?>
        <TR>
          <TD width="50" class=altbg2><?php echo $row->level_id ?></TD>
          <TD class="altbg2"><a title="点击可编辑" href="<?php echo site_url("admin/lev_edit") ."/". $row->level_id; ?>" target="main"><?php echo $row->level_name?></a></TD>
           <TD class=altbg2><?php echo "<B>" .$row->level."</B>" ."&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;".$row->level_description."&nbsp;]"?></TD>
          <TD width="80" class=altbg2><a href="<?php echo site_url("admin/lev_edit") ."/". $row->level_id; ?>">编辑</a> </TD>
          <TD width="80" class=altbg2><a href="<?php echo site_url("admin/lev_del") ."/". $row->level_id."/lev_add"; ?>" onClick="return(confirm('删除后不可恢复，确定删除？'))">删除</a></TD>
        </TR>
        <?php
        	endforeach;
        }
        ?>
       
        <TR>
          <TD colspan="5" class="altbg2">&nbsp;</TD>
        </TR>
       </TBODY></TABLE>
       <FORM id="myform" name="myform" method="post">
        <table class="tableborder" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr class="header">
          <td colspan="2">添加系统权根 </td>
        </tr>
        <tr>
          <td width="100">权根名称：            </td>
          <td><input type="text" name="name" id="name" size="35"></td>
        </tr>
        <tr>
          <td>权根描述：            </td>
          <td><input type="text" name="dspt" id="dspt" size="35" ></td>
        </tr>
        <tr>
          <td>级别字串：           </td>
         <td><input type="text" name="lev" id="lev" size="35"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input id="submit" type=submit value="保 存" name=submit>&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="button" value="继续添加" name="con" onclick=" $('#myform').clearForm();$('#name').focus();">&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="button" value="全部刷新" name="con" onclick="window.location.reload() ;">&nbsp;&nbsp;&nbsp;&nbsp;
          </td>
        </tr>
        <tr>
          <td>  </td>
          <td > <div id="msgs" style="margin-top:12px;margin-bottom:5px;font-size:13px;color: #C62E25;font-weight:bold;"></div>        </td>
        </tr>
      </table>
      </FORM>
     </TD>
     </TR>
    </TBODY>
   </TABLE><BR><BR>
      <DIV class=footer>
        <HR width="80%" color=#9db3c5 noShade SIZE=0>
         Powered by <? echo $copyright ?> <em>,</em> <B><A style="COLOR: #666" href="<? echo base_url() ?>" target="_blank"><? echo $version;?>.</A></B>
      </DIV>
</BODY></HTML>
